From 10aa3d34bc599232af07d8a643c9938be14cb5bf Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Mon, 8 Sep 2025 10:33:01 +0000 Subject: (김준회) 입찰 인터페이스 처리, 자재그룹명 매핑 수정, 자재그룹 뷰 수정, 부서별 도메인 할당시 동기화 처리, 도메인 부서 할당 다이얼로그 부서목록 스크롤 처리, 삼성중공업 사용자 global search 개선 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_components/department-menu-access-manager.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/[lng]/evcp/(evcp)/menu-access-dept/_components/department-menu-access-manager.tsx') diff --git a/app/[lng]/evcp/(evcp)/menu-access-dept/_components/department-menu-access-manager.tsx b/app/[lng]/evcp/(evcp)/menu-access-dept/_components/department-menu-access-manager.tsx index bf43e7a9..c24770bf 100644 --- a/app/[lng]/evcp/(evcp)/menu-access-dept/_components/department-menu-access-manager.tsx +++ b/app/[lng]/evcp/(evcp)/menu-access-dept/_components/department-menu-access-manager.tsx @@ -15,6 +15,7 @@ import { import { assignDomainToDepartments, getDepartmentDomainAssignments, + autoAssignPendingUsersDomains, type UserDomain } from "@/lib/users/department-domain/service"; import { DOMAIN_OPTIONS } from "./domain-constants"; @@ -138,6 +139,17 @@ export function DepartmentMenuAccessManager({ } catch (error) { console.error("할당 정보 새로고침 실패:", error); } + + // users 테이블에 도메인 동기화 작업 진행 + try { + const syncResult = await autoAssignPendingUsersDomains(); + if (syncResult.success && syncResult.assignedCount > 0) { + toast.success(`사용자 도메인 동기화 완료: ${syncResult.assignedCount}명의 사용자가 자동 할당되었습니다.`); + } + } catch (error) { + console.error("사용자 도메인 동기화 실패:", error); + // 동기화 실패해도 메인 할당은 성공이므로 에러 토스트는 표시하지 않음 + } } else { toast.error(result.message); } -- cgit v1.2.3